package com.crm.jdy.common.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.crm.jdy.common.vo.PageVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserInfoDto  extends PageVO implements Serializable {

    private static final long serialVersionUID = 16170955297L;


    @TableId(value = "user_id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(name = "userId" , value = "用户主键id")
    private String userId;

    @NotBlank(message = "用户姓名非空")
    @ApiModelProperty(name = "userName" , value = "用户姓名")
    private String userName;

    @NotBlank(message = "用户密码非空")
    @ApiModelProperty(name = "userPwd" , value = "用户密码")
    private String userPwd;

    @ApiModelProperty(name = "userPhone" , value = "用户电话")
    private String userPhone;

    @ApiModelProperty(name = "userParent" , value = "上级")
    private String userParent;

    @ApiModelProperty(name = "userSex" , value = "性别")
    private String userSex;

    @ApiModelProperty(name = "userDept" , value = "部门")
    private String userDept;

    @ApiModelProperty(name = "userDeptid" , value = "部门id")
    private String userDeptid;

    @ApiModelProperty(name = "userWork" , value = "岗位")
    private String userWork;

    @ApiModelProperty(name = "userSalt" , value = "盐值")
    private String userSalt;

    @ApiModelProperty(name = "userValid" , value = "级别")
    private Integer userValid;

    @ApiModelProperty(name = "userCrePerson" , value = "创建人")
    private String userCrePerson;

    @ApiModelProperty(name = "userUpdPerson" , value = "更新人")
    private String userUpdPerson;

    @NotNull(message = "用户角色不能为空")
    @ApiModelProperty(name = "userRole" , value = "用户角色")
    private String userRole;

    @ApiModelProperty(name = "userPerId" , value = "角色权限id")
    private String userPerId;

    @ApiModelProperty(name = "userPerName" , value = "权限名称")
    private String userPerName;

    @ApiModelProperty(name = "userPerUrl" , value = "权限url")
    private String userPerUrl;

    @ApiModelProperty(name = "userOpen" , value = "权限是否打开")
    private String userOpen;

    @ApiModelProperty(name = "userChecked" , value = "是否权限校验")
    private String userChecked;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "createTime" , value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "updateTime" , value = "更新最新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @JsonIgnore
    @TableLogic
    @ApiModelProperty(name = "isDelete" , value = "0正常  1删除")
    private Integer isDelete;

    private List<RoleInfoDto>  dtoList;



}
